from sqlalchemy import Column, ForeignKey, Date
from sqlalchemy.orm import relationship
from sqlalchemy.dialects.oracle import VARCHAR2, NUMBER
from app.db.base import Base


class ITEDashboardManual(Base):
    __tablename__ = 'ITE_DASHBOARD_MANUAL'
    __table_args__ = {'schema': 'IARO_CAREER'}

    ite_id                     = Column(NUMBER, ForeignKey('IARO_CAREER.ITE_DETAIL.ite_id', ondelete='CASCADE'), primary_key=True)
    indigenous_student         = Column(VARCHAR2(3))     # YES / NO
    placement_performance      = Column(VARCHAR2(100))
    grade_updated              = Column(VARCHAR2(3))     # YES / NO
    grade_updated_date         = Column(Date)
    unsw_attendee_presentation = Column(VARCHAR2(3))     # YES / NO
    mpc_submitted_date         = Column(Date)
    mpc_submitted_on_time      = Column(VARCHAR2(3))     # YES / NO
    mpc_call_date              = Column(Date)
    mpc_call_on_time           = Column(VARCHAR2(3))     # YES / NO
    it_change_approved         = Column(VARCHAR2(3))     # YES / NO

    ite_detail = relationship("ITEDetail", back_populates="dashboard_manual", uselist=False)